<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>千园千变，万班万课</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <script>
    sessionStorage.removeItem('breadcrumb1',null)
    sessionStorage.setItem('breadcrumb2','登录信息')
    </script>
</head>
<body>
<div class="tpl-portlet-components">
    <div class="portlet-title">
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li class="am-active">登录信息</li>
        </ol>
    </div>
    <div class="tpl-block ">
        <div class="am-g tpl-amazeui-form">
            <div class="am-u-sm-12">
                <form class="am-form am-form-horizontal">
                    <div class="am-form-group check_permission[0,1]"  >
                        <label for="username" class="am-u-sm-2 am-form-label" style="color:#f00;font-weight: bold;font-size: 15px" >我的服务码</label>
                        <div class="am-u-sm-10 line">
                            <b id="serviceCode" class="am-form-label" style="color:#f00;font-weight: bold;font-size: 15px"></b>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="username" class="am-u-sm-2 am-form-label">账号</label>
                        <div class="am-u-sm-10 line">

                            <b id="userName" class="am-form-label"></b>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="pwd" class="am-u-sm-2 am-form-label">原密码</label>
                        <div class="am-u-sm-10">
                            <input type="password" id="pwd" name="pwd" style="width: 300px" placeholder="输入密码">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="pwd" class="am-u-sm-2 am-form-label">新密码</label>
                        <div class="am-u-sm-10">
                            <input type="password" id="one_pwd" name="one_pwd" style="width: 300px" placeholder="输入密码">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="two_pwd" class="am-u-sm-2 am-form-label">确认密码</label>
                        <div class="am-u-sm-10">
                            <input type="password" id="two_pwd" name="two_pwd" style="width: 300px"
                                   placeholder="输入确认密码">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="username" class="am-u-sm-2 am-form-label">登录IP</label>
                        <div class="am-u-sm-10 line">
                            <b id="login_ip" class="am-form-label"></b>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="username" class="am-u-sm-2 am-form-label">登录时间</label>
                        <div class="am-u-sm-10 line">
                            <b id="login_time" class="am-form-label"></b>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-2">
                            <button type="button" class="am-btn am-btn-primary" id="submitBtn">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/layer.js"></script>
<script src="assets/js/jquery.cookie.js"></script>
<script src="assets/js/md5.min.js"></script>
<script src="assets/js/verification.js"></script>
<script src="assets/js/request.js"></script>
<script src="assets/js/jquery.pagination.js"></script>
<script src="assets/js/jquery.serializejson.min.js"></script>
<script src="assets/js/jquery.params.js"></script>
<script src="assets/js/app.js"></script>
<script>

function setInfo () {
  var loginData=JSON.parse($.cookie('loginData'))
  $('#userName').html(loginData.username)
  $('#serviceCode').html(loginData.serve_code)
  $('#login_time').html(loginData.login_time)
  $('#login_ip').html(loginData.login_ip)
}
setInfo()
$('#submitBtn').click(function (e) {
  e.preventDefault()
  if (Verification()) {
    var formData = $('form').serializeJSON()
    AjaxRequest({
      url:'/admin/pwd_edit/',
      data: formData,
      succFun: function (res) {
        layer.msg(res.message, {icon: 1, time: 1000})
      }
    })
  }
})
</script>
</body>
</html>